﻿using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.ApplicationPages;
using SPThumbnailExtender.Interne;

namespace SPThumbnailExtender.Layouts.SPThumbnailExtender
{
    public partial class Settings : GlobalAdminPageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            txtContentSource.Text = Helper.GetParameter("SPThumbnailExtender.ContentSource").ToString();
            txtServiceApplicationName.Text = Helper.GetParameter("SPThumbnailExtender.ServiceApplication").ToString();
            if (Helper.GetParameter("SPThumbnailExtender.Resolution") != null)
                ddlResolution.SelectedValue = Helper.GetParameter("SPThumbnailExtender.Resolution").ToString();
            else
                ddlResolution.SelectedValue = "2";
        }
        protected void btnOK_Click(object sender, EventArgs e)
        {
            Helper.SetParameter("SPThumbnailExtender.ContentSource", txtContentSource.Text);
            Helper.SetParameter("SPThumbnailExtender.ServiceApplication", txtServiceApplicationName.Text);
            Helper.SetParameter("SPThumbnailExtender.Resolution", ddlResolution.SelectedValue);
            Helper.SetParameter("SPThumbnailExtender.NbPage", ddlNbPage.SelectedValue);

        }
        protected void btnCancel_Click(object sender, EventArgs e)
        {

        }

    }
}
